#!/bin/bash

if [ $# -eq 0 ]; then 
    if [ "$LANG" = "zh_CN.UTF-8" ]; then 
        echo "请输入要执行的命令" 
    else 
        echo "Please enter the command to execute"    
    fi
    exit 1  
fi

command -v "$1" > /dev/null 2>&1 || 
{ 
    if [ "$LANG" = "zh_CN.UTF-8" ]; then
        echo "未找到命令：$1" >&2 
    else 
        echo "Command not found: $1" >&2 
    fi 
    exit 1 
}

while true; do
    clear && "$@" 
    wait $! 
    sleep 0.5 
done
